import request from '@/utils/request'

const api_name = '/admin/system/sysMenu'

// 获取菜单
export const FindNodes = () => {
  return request({
    url: `${api_name}/findNodes`,
    method: 'get',
  })
}

//添加菜单
export const SaveMenu = (sysMenu) => {
    return request({
        url: `${api_name}/save`,
        method: 'post',
        data: sysMenu
    }) 
}

//修改菜单
export const UpdateSysMenuById = (sysMenu) => {
    return request({
        url: `${api_name}/updateById`,
        method: 'put',
        data: sysMenu
    })
}

//删除菜单
export const RemoveSysMenuById = (id) => {
    return request({
        url: `${api_name}/removeById/${id}`, 
        method: 'delete'
    })      
}